package com.chatsocket.socketServlet;

import javax.servlet.http.HttpSession;
import javax.websocket.HandshakeResponse;
import javax.websocket.server.HandshakeRequest;
import javax.websocket.server.ServerEndpointConfig;

import org.apache.tomcat.websocket.server.DefaultServerEndpointConfigurator;

public class HttpSocketConfig extends DefaultServerEndpointConfigurator {
	@Override
	public void modifyHandshake(ServerEndpointConfig sec, HandshakeRequest request, HandshakeResponse response) {
		super.modifyHandshake(sec, request, response);
		System.out.println(request.getHttpSession());
		sec.getUserProperties().put("httpSession",(HttpSession)request.getHttpSession());
	}
}
